package bit1;

import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

//public class homework {
//    public static void main(String[] args) {
////        short a =128;
////        byte b =(byte) a;
////        System.out.println(a);
////        System.out.println(b);
////        double x=2.0; int y=4; x/=++y;
////        System.out.println(x);
////        float b = 3.5f;
////        int  a = 3; byte b = (byte) a;
////        System.out.println(b);
//        String a;
////        a>>>=1;
//        System.out.println(a);
//        System.out.println("\\\"hello\\\"");
//        switch (a){
//
//        }
//    }
//}
public class homework {
    public static void main(String[] args) {
//        Scanner in=new Scanner(System.in);
//        int num=in.nextInt();
//        System.out.print("奇数序列：");
//        for (int i = 31; i >=0; i=i-2) {
//            System.out.print((num>>i)&1);
//        }
//        System.out.println();
//        System.out.print("偶数序列：");
//        for (int i = 30; i >=0; i=i-2) {
//            System.out.print((num>>i)&1);
//        }
        char ch[]={'c','s'};
        String st=ch.toString();
        System.out.println(st);
    }
    public static void main13(String[] args) {
        Scanner in=new Scanner(System.in);
        String password1="asjcaksjsa";
        String password2;
        int count=0;
        while (count!=3){
            password2=in.nextLine();
            count++;
            if (password1.equals(password2)){
                System.out.printf("登录成功\n");
            }
            else{
                System.out.println("密码错误");
            }
        }
    }
    public static void main12(String[] args) {
        for (int i = 1; i <=9; i++) {
            for (int j =1; j <=i; j++) {
                System.out.printf("%2d*%d=%-2d",j,i,i*j);
            }
            System.out.printf("\n");
        }
    }
    public static int num(int number){
        if(number<10){
            System.out.println(number);
            return number;
        }
        num(number/10);
        System.out.println(number%10);
        return 0;
    }
    public static void main11(String[] args) {
        Scanner in=new Scanner(System.in);
        int number=in.nextInt();
        num(number);
    }
    public static void main10(String[] args) {
        Scanner in=new Scanner(System.in);
        int num=in.nextInt();
        int count=0;
        while (num!=0){
            num=num&(num-1);
            count++;
        }
        System.out.println("count="+count);
    }
    public static void main9(String[] args) {
        Scanner in=new Scanner(System.in);
        int num1=in.nextInt();
        int num2=in.nextInt();
        int max=Math.max(num1,num2);
        int min=Math.min(num1,num2);
        int num3;
        while(min!=0){
            num3=max%min;
            max=min;
            min=num3;
        }
        System.out.println(max);
    }
    public static void main8(String[] args) {
        Scanner in=new Scanner(System.in);
        int num=in.nextInt();
        int ret=1;
        double sum=0.0;
        for (int i = 1; i<=num; i++) {
            sum+=1.0/i*ret;
            ret=ret*-1;
        }
        System.out.println(sum);
    }
    public static void main7(String[] args) {
        Scanner in=new Scanner(System.in);
        int number=in.nextInt();
        double sum=0.0;
        int count=0;
        int tmp=number;
        while (tmp!=0){
            count++;
            tmp=tmp/10;
        }
        tmp=number;
        for(int i=0;i<count;i++){
            sum+=Math.pow(tmp%10,3);
            tmp=tmp/10;
        }
        if(sum==number){
            System.out.println(number+"是水仙数");
        }
        else{
            System.out.println(number+"不是水仙数");
        }
    }
    public static void main6(String[] args) {
        Scanner in=new Scanner(System.in);
        Random one=new Random();
        int ramdom= one.nextInt(100);
        int count=0;
        System.out.println("请输入1-100的数");
        while (in.hasNextDouble())
        {
            count++;
            int guess=in.nextInt();
            if(guess<ramdom){
                System.out.println("猜小了");
            }
            else if(guess>ramdom){
                System.out.println("猜大了");
            }
            else{
                System.out.println("恭喜你，猜正确了，一共猜了"+count+"次");
            }
        }
    }
    public static void main5(String[] args) {
        Scanner in=new Scanner(System.in);
        while (in.hasNextDouble()){
            int n=in.nextInt();
            char arr[][]=new char[n][n];
            for (int i = 0; i <n; i++) {
                for (int j = 0; j <n; j++) {
                    if(i==j||j+i==n-1){
                        arr[i][j]='*';
                    }
                    else{
                        arr[i][j]=' ';
                    }
                }
            }
            for (int i = 0; i <n; i++) {
                for (int j = 0; j < arr[i].length; j++) {
                    System.out.print(arr[i][j]);
                }
                System.out.println();
            }
        }


    }
    public static void main4(String[] args) {
        Scanner in=new Scanner(System.in);
        int age=in.nextInt();
        if(age<=18){
            System.out.println("少年");
        }
        else if(age>=19&&age<=28){
            System.out.println("青年");
        }
        else if(age>=29&&age<=55){
            System.out.println("中年");
        }
        else if (age>=56){
            System.out.println("老年");
        }
    }
    public static int isPriem(int number){
        int i;
        for (i = 2; i <=Math.sqrt(number); i++) {
            if(number%i==0){
                break;
            }
        }
        if(i>Math.sqrt(number))
        {
            return 1;
        }
        return 0;
    }

    public static void main3(String[] args) {
        Scanner in=new Scanner(System.in);
        int number=in.nextInt();
        if(number==1){
            System.out.println(number+"不是素数");
        }
        else {
            if(isPriem(number)==1){
                System.out.println(number+"是素数");
            }
            else{
                System.out.println(number+"不是素数");
            }
        }
    }
    public static void main2(String[] args) {
        int count=0;
        for (int i = 1; i <=100; i++) {
            if(i==1)
            {
                continue;
            }
            else {
                if (isPriem(i)==1){
                    System.out.printf("%d ",i);
                    count++;
                }
            }
        }
        System.out.println( );
        System.out.println("count="+count);
    }
    public static boolean isLeapYear(int year){
        if((year%400==0)||(year%4==0&&year%100!=0))
        {
            return true;
        }
        return false;
    }
    public static void main1(String[] args) {
        int count=0;
        for(int year=1000;year<=2000;year++){
            if(isLeapYear(year)==true)
            {
                count++;
                System.out.print(year+" ");
                if(count%10==0)
                {
                    System.out.println();
                }
            }
        }
        System.out.println("count="+count);
    }
    public static void main0(String[] args) {
        int count=0;
        for (int i = 1; i <=100 ; i++) {
           if(i%10==9)
           {
               count++;
           }
           if(i/10==9)
           {
               count++;
           }
        }
        char ch[]={'c','s'};
        String st=ch.toString();
        System.out.println(st);
        //System.out.println(count);
    }
}